import random

result = {
    'T': 0, 
    'H': 0,
    'TH': 0, 
    'HT': 0, 
}


for _ in range(1000000000):
    coin1 , coin2 = \
        random.choices('TH', weights=[0.3, 0.7], k = 2)

    result[coin1] += 1
    result[coin2] += 1

    if coin1 != coin2 :
        result[coin1 + coin2] += 1

print(result)
print('3 / 7', 3 / 7)
print('T / H', result['T'] / result['H'])
print('TH / HT', result['TH'] / result['HT'])